Optimal. Leaf size=138 \[ -\frac {2 (80 A-3 B) \tan (c+d x)}{105 a^4 d (\sec (c+d x)+1)}-\frac {(55 A-6 B) \tan (c+d x)}{105 a^4 d (\sec (c+d x)+1)^2}+\frac {A x}{a^4}-\frac {(10 A-3 B) \tan (c+d x)}{35 a d (a \sec (c+d x)+a)^3}-\frac {(A-B) \tan (c+d x)}{7 d (a \sec (c+d x)+a)^4} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.27, antiderivative size = 138, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3922, 3919, 3794} \[ -\frac {2 (80 A-3 B) \tan (c+d x)}{105 a^4 d (\sec (c+d x)+1)}-\frac {(55 A-6 B) \tan (c+d x)}{105 a^4 d (\sec (c+d x)+1)^2}+\frac {A x}{a^4}-\frac {(10 A-3 B) \tan (c+d x)}{35 a d (a \sec (c+d x)+a)^3}-\frac {(A-B) \tan (c+d x)}{7 d (a \sec (c+d x)+a)^4} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3794
Rule 3919
Rule 3922
Rubi steps
\begin {align*} \int \frac {A+B \sec (c+d x)}{(a+a \sec (c+d x))^4} \, dx &=-\frac {(A-B) \tan (c+d x)}{7 d (a+a \sec (c+d x))^4}-\frac {\int \frac {-7 a A+3 a (A-B) \sec (c+d x)}{(a+a \sec (c+d x))^3} \, dx}{7 a^2}\\ &=-\frac {(A-B) \tan (c+d x)}{7 d (a+a \sec (c+d x))^4}-\frac {(10 A-3 B) \tan (c+d x)}{35 a d (a+a \sec (c+d x))^3}+\frac {\int \frac {35 a^2 A-2 a^2 (10 A-3 B) \sec (c+d x)}{(a+a \sec (c+d x))^2} \, dx}{35 a^4}\\ &=-\frac {(55 A-6 B) \tan (c+d x)}{105 a^4 d (1+\sec (c+d x))^2}-\frac {(A-B) \tan (c+d x)}{7 d (a+a \sec (c+d x))^4}-\frac {(10 A-3 B) \tan (c+d x)}{35 a d (a+a \sec (c+d x))^3}-\frac {\int \frac {-105 a^3 A+a^3 (55 A-6 B) \sec (c+d x)}{a+a \sec (c+d x)} \, dx}{105 a^6}\\ &=\frac {A x}{a^4}-\frac {(55 A-6 B) \tan (c+d x)}{105 a^4 d (1+\sec (c+d x))^2}-\frac {(A-B) \tan (c+d x)}{7 d (a+a \sec (c+d x))^4}-\frac {(10 A-3 B) \tan (c+d x)}{35 a d (a+a \sec (c+d x))^3}-\frac {(2 (80 A-3 B)) \int \frac {\sec (c+d x)}{a+a \sec (c+d x)} \, dx}{105 a^3}\\ &=\frac {A x}{a^4}-\frac {(55 A-6 B) \tan (c+d x)}{105 a^4 d (1+\sec (c+d x))^2}-\frac {(A-B) \tan (c+d x)}{7 d (a+a \sec (c+d x))^4}-\frac {(10 A-3 B) \tan (c+d x)}{35 a d (a+a \sec (c+d x))^3}-\frac {2 (80 A-3 B) \tan (c+d x)}{105 d \left (a^4+a^4 \sec (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.79, size = 329, normalized size = 2.38 \[ \frac {\sec \left (\frac {c}{2}\right ) \sec ^7\left (\frac {1}{2} (c+d x)\right ) \left (8260 A \sin \left (c+\frac {d x}{2}\right )-7140 A \sin \left (c+\frac {3 d x}{2}\right )+3780 A \sin \left (2 c+\frac {3 d x}{2}\right )-2800 A \sin \left (2 c+\frac {5 d x}{2}\right )+840 A \sin \left (3 c+\frac {5 d x}{2}\right )-520 A \sin \left (3 c+\frac {7 d x}{2}\right )+3675 A d x \cos \left (c+\frac {d x}{2}\right )+2205 A d x \cos \left (c+\frac {3 d x}{2}\right )+2205 A d x \cos \left (2 c+\frac {3 d x}{2}\right )+735 A d x \cos \left (2 c+\frac {5 d x}{2}\right )+735 A d x \cos \left (3 c+\frac {5 d x}{2}\right )+105 A d x \cos \left (3 c+\frac {7 d x}{2}\right )+105 A d x \cos \left (4 c+\frac {7 d x}{2}\right )-9940 A \sin \left (\frac {d x}{2}\right )+3675 A d x \cos \left (\frac {d x}{2}\right )-1260 B \sin \left (c+\frac {d x}{2}\right )+882 B \sin \left (c+\frac {3 d x}{2}\right )-630 B \sin \left (2 c+\frac {3 d x}{2}\right )+294 B \sin \left (2 c+\frac {5 d x}{2}\right )-210 B \sin \left (3 c+\frac {5 d x}{2}\right )+72 B \sin \left (3 c+\frac {7 d x}{2}\right )+1260 B \sin \left (\frac {d x}{2}\right )\right )}{13440 a^4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.44, size = 181, normalized size = 1.31 \[ \frac {105 \, A d x \cos \left (d x + c\right )^{4} + 420 \, A d x \cos \left (d x + c\right )^{3} + 630 \, A d x \cos \left (d x + c\right )^{2} + 420 \, A d x \cos \left (d x + c\right ) + 105 \, A d x - {\left (4 \, {\left (65 \, A - 9 \, B\right )} \cos \left (d x + c\right )^{3} + {\left (620 \, A - 39 \, B\right )} \cos \left (d x + c\right )^{2} + {\left (535 \, A - 24 \, B\right )} \cos \left (d x + c\right ) + 160 \, A - 6 \, B\right )} \sin \left (d x + c\right )}{105 \, {\left (a^{4} d \cos \left (d x + c\right )^{4} + 4 \, a^{4} d \cos \left (d x + c\right )^{3} + 6 \, a^{4} d \cos \left (d x + c\right )^{2} + 4 \, a^{4} d \cos \left (d x + c\right ) + a^{4} d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.29, size = 154, normalized size = 1.12 \[ \frac {\frac {840 \, {\left (d x + c\right )} A}{a^{4}} + \frac {15 \, A a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 15 \, B a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 105 \, A a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 63 \, B a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 385 \, A a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 105 \, B a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 1575 \, A a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 105 \, B a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{28}}}{840 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.80, size = 177, normalized size = 1.28 \[ \frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) A}{56 d \,a^{4}}-\frac {B \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{56 d \,a^{4}}-\frac {A \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d \,a^{4}}+\frac {3 B \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{40 d \,a^{4}}+\frac {11 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) A}{24 d \,a^{4}}-\frac {B \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d \,a^{4}}-\frac {15 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d \,a^{4}}+\frac {B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d \,a^{4}}+\frac {2 A \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.72, size = 201, normalized size = 1.46 \[ -\frac {5 \, A {\left (\frac {\frac {315 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {77 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {21 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {3 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}}{a^{4}} - \frac {336 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{4}}\right )} - \frac {3 \, B {\left (\frac {35 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {35 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {21 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {5 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}\right )}}{a^{4}}}{840 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.03, size = 163, normalized size = 1.18 \[ \frac {A\,x}{a^4}-\frac {\left (\frac {52\,A\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{21}-\frac {12\,B\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{35}\right )\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\left (\frac {23\,B\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{70}-\frac {16\,A\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{21}\right )\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\left (\frac {5\,A\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{28}-\frac {9\,B\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{70}\right )\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-\frac {A\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{56}+\frac {B\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{56}}{a^4\,d\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {A}{\sec ^{4}{\left (c + d x \right )} + 4 \sec ^{3}{\left (c + d x \right )} + 6 \sec ^{2}{\left (c + d x \right )} + 4 \sec {\left (c + d x \right )} + 1}\, dx + \int \frac {B \sec {\left (c + d x \right )}}{\sec ^{4}{\left (c + d x \right )} + 4 \sec ^{3}{\left (c + d x \right )} + 6 \sec ^{2}{\left (c + d x \right )} + 4 \sec {\left (c + d x \right )} + 1}\, dx}{a^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________